package com.seataxa.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/****************************************************
 * Seata XA模式使用步骤：
 *   1）修改JDBC数据源，将DataSource 修改成DataSourceProxyXA
 *   2）在service 层上添加注解 @GlobalTransactional 开启全局事务（注意与 AT模式的区别，At模式@GlobalTransactional是标准在controller上）
 *
 * @author lbf
 * @date 2025/7/16 13:32
 ****************************************************/
@MapperScan(basePackages = {"com.seataxa.order.mapper"}) //mapper接口扫描
@EnableDiscoveryClient
@SpringBootApplication
public class SeataXaOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(SeataXaOrderApplication.class);
    }
}
